package com.wzdigit.wms.common.utils;

import java.util.regex.Pattern;

import com.wzdigit.wms.basic.util.StringUtils;

public class RegularUtils {

	private final static boolean panduanZZBDS(String name, String pattern){
		//这就是判断过程
		if(StringUtils.isNull(name)){
			return false;
		}
		return Pattern.compile(pattern).matcher(name).matches();
	}
	
	/*车牌号验证*/
	public final static boolean carNoJudge(String name) throws Exception {
		String pattern = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}"
				+ "[A-Z]{1}(?:(?![A-Z]{4})[A-Z0-9]){4}[A-Z0-9挂学警港澳]{1}$";
		return panduanZZBDS(name , pattern);
	}
}
